home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / spelling.arc / SPELL.DOC < prev   
Encoding:
Text File  |  1985-12-14  |  9.0 KB  |  189 lines

  1.                               Spelling Checker
  2.                               ----------------
  3.  
  4.         BACKGROUND:
  5.         ----------
  6.             The spelling checker package is made up of three files.  Each
  7.         file name is listed below, along with a brief explanation of what
  8.         the file is.
  9.  
  10.              SPELL.COM   = The executable code for the spelling checker.
  11.              DICTION.ARY = A file of many correctly spelled words.
  12.                            (Currently contains 21,082 words.)
  13.              SPELL.DOC   = Brief   documentation  file   that   gives
  14.                            instructions and hints on the use of SPELL.
  15.  
  16.         In  addition to the files above,  each time SPELL is run it  will
  17.         create  a  file  named SPELL.ERR.   This file list  the  possible
  18.         misspellings found in the input file.
  19.  
  20.              This is the first attempt at writing any program for release
  21.         to  the public.   The program was designed to be as efficient  as
  22.         possible and fairly easy to use.
  23.  
  24.  
  25.         RUNNING THE PROGRAM:
  26.         -------------------
  27.         At the DOS prompt enter:
  28.  
  29.              SPELL filename
  30.  
  31.         where  filename  is the name of the file you want to be  checked.
  32.         If the filename is not entered on the command line then you  will
  33.         be  prompted for it.   Assuming that you entered a valid filename
  34.         you will see a message like the one below.
  35.  
  36.              Enter the drive (path) where SPELL.ERR is to be
  37.              placed or just press RETURN for A:\
  38.  
  39.         In  this example the default drive and directory was  A:\.   This
  40.         prompt  is  asking  you where the file of  possible  misspellings
  41.         should be created.  An example of a valid response to this prompt
  42.         is C:\DOCUMENT\.   If the default is ok with you then just  press
  43.         the  return key.   Otherwise you may enter a path name to  direct
  44.         where the file is to be created,  the path name must end with the
  45.         back slash character (\).   If the DICTION.ARY file is not on the
  46.         default  drive  and in the default directory,  the  program  will
  47.         prompt you to tell it where the file is located.
  48.  
  49.         By  this  time the program is running,  during the course of  the
  50.         program you will be informed of its progress by messages  similar
  51.         to the ones shown below.
  52.  
  53.           Scanning  the input file...  completed scanning   X1 of  X2 blocks.
  54.  
  55.           Verifying the spelling!
  56.           Reading  the dictionary...  completed comparing   X1 of  X2 blocks.
  57.         
  58.         In each case X2 represents the total number of blocks in the file
  59.         (a  block is 128 bytes),   and X1 is the number of blocks it  has
  60.         completed  at the time of display.   The number X1 is updated  in
  61.         intervals  of  16.   This  is because the  program  maintains  an
  62.         internal  2K buffer,  upon completion of each buffer the total is
  63.         updated.   When the program completes you will see a message like
  64.         the one below.
  65.  
  66.           A list of possible misspellings is in a file named SPELL.ERR
  67.           you may list the file or print it at your convenience.
  68.  
  69.  
  70.         SPELL.ERR File
  71.         --------------
  72.              A  sample of the SPELL.ERR file is shown below.   The number
  73.         to  the  left of a word represents the number of  occurrences  of
  74.         that word in the input file.  In this case the word documentation
  75.         was  misspelled and the same mistake was made twice in the  input
  76.         file.   The  last line of the SPELL.ERR file tells you the  total
  77.         number of words contained in the input file (135 in this case.)
  78.  
  79.  
  80.              --- Possible Misspellings ---
  81.         *** thiswordistoolongtobeavalidword
  82.           2 documentaion
  83.         **** Input file contains a total of 135 word(s).
  84.  
  85.         Normally  there  will be many possible  misspellings.  The  first
  86.         entry  in  this  file is an example of what you get when  a  word
  87.         exceeds  the  maximum  length of a valid  word  (30  characters).
  88.         After  viewing  this  file you may  reenter  your  favorite  word
  89.         processor and correct any mistakes.
  90.  
  91.         Note:
  92.              1.    The spelling checker flags any word that is not in its
  93.              dictionary,  the word may be truly misspelled or it just may
  94.              be that the word is not in the dictionary.  Likewise, if you
  95.              type  the word "from" in the text when you intended to  type
  96.              the  word "form" the spelling checker will not flag this  as
  97.              an  error.   The  latter  is a valid word  and  no  spelling
  98.              checker has the ability to read your mind.
  99.  
  100.              2.     The  spelling checker keeps a list of  unique  words,
  101.              every  word  is  mapped  into lower  case  for  storage  and
  102.              comparison  purposes,  but its case (upper & lower) is  also
  103.              saved.   What  this means to you is that the form in which a
  104.              misspelled  word  first appears in a file is the  form  that
  105.              will be put into SPELL.ERR.   i.e.  If the words Ther, THER,
  106.              ther, thEr and THeR appeared in the same file in that order;
  107.              the corresponding entry in SPELL.ERR would be:
  108.  
  109.                  5 Ther.
  110.  
  111.              3.    If  a  word is longer than 30 characters the  word  is
  112.              immediately  output  to  SPELL.ERR  with  asterisks  in  the
  113.              frequency field.
  114.         
  115.         INPUT:
  116.         ------
  117.              SPELL  will  accept either standard ASCII files or  Wordstar
  118.         files as input,  the program doesn't really care.   A side effect
  119.         of this is that if the file being checked uses characters in  the
  120.         extended  ASCII  character set,  they will be mapped  into  their
  121.         Wordstar  character  equivalents.   (If the last remark  confuses
  122.         you, just ignore it).
  123.  
  124.         PERFORMANCE CONSIDERATIONS:
  125.         --------------------------
  126.              1.    Run  time  is acceptable with a floppy  based  system,
  127.              although  a hard disk or ram disk is nice.   But unless  you
  128.              have a lot of memory you will not be able to set aside  much
  129.              for a ram disk when checking large files.  (I have checked a
  130.              80  page  file  before  but it used slightly  over  192K  of
  131.              memory.)   If  you  can put the SPELL.ERR file  on  a  drive
  132.              different  from the drive that has the DICTION.ARY  file  it
  133.              will run somewhat faster.
  134.  
  135.              2.    DO  NOT USE SPELL to verify a list of words that is in
  136.              sorted order.  Due to the internal data structures used this
  137.              gives the worst case run time.  The more random the ordering
  138.              of the words, the faster the program will run.
  139.  
  140.         NOTE:
  141.         -----
  142.              Due  to the scanning algorithm,  something like 7B7800  will
  143.              appear  in SPELL.ERR as B7800.   The algorithm just skips  a
  144.              number  when  it is encountered by itself,  but when  it  is
  145.              building a word the numbers are considered to be part of the
  146.              word.  (This was my preference.   Logical?)
  147.  
  148.         DICTION.ARY:
  149.         -----------
  150.              This file is not in a standard ASCII format.   The following
  151.         gives  you a brief explanation of how the file is setup  in  case
  152.         you are interested.   The format of the file is nSTRnSTRnSTR.....
  153.         where n is a single byte telling how many characters to save from
  154.         the  previous  word.   And STR is the string to be added  to  the
  155.         previous n characters.   For example:  the three words ape, apple
  156.         and appreciate would be stored as
  157.  
  158.            0ape2ple3reciate
  159.  
  160.         This storage scheme yields more than a 60% savings on disk  space
  161.         as  compared to the same file in standard ASCII format.   Without
  162.         some   type  of  compression  the  current  dictionary  file   is
  163.         approaching 200K bytes.   This scheme is easily improved upon and
  164.         it will be modified for future versions,  as the number of  words
  165.         in the dictionary increases.
  166.         
  167.         FUTURE VERSIONS:
  168.         ---------------
  169.         1. Provision for a secondary user defined dictionary.
  170.         2. Greater number of words in the dictionary.
  171.         3. Improved (more compact) storage of the dictionary.
  172.  
  173.              Any  suggestions  or  comments are  welcome.   They  may  be
  174.         directed to:
  175.  
  176.              Keith Miller
  177.              626 Timothy Dr.
  178.              Linthicum, Md. 21090
  179.  
  180.         If  you use this program regularly a contribution ($10 suggested)
  181.         may be sent to the above address.
  182.  
  183.         DISCLAIMER NOTICE:
  184.         -----------------
  185.            An  honest  effort has been made to ensure that  this  product
  186.         runs correctly and is accurate.   However it is distributed on an
  187.         as is basis with no guarantee,  implied or otherwise.   It may be
  188.         distributed freely but only in its unmodified form.
  189.